import { commonRequest, requestToData, requestToExport } from '@/api/commonHttp';
/* 列表页 */
// 临采商品管理 - 批量上架
export const queryEditPermissionService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/valOpeDepartmentPermission',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理 - 批量上架
export const batchPutOnShelvesService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/upSkuState',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理 - 批量下架
export const batchPullOnShelvesService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/batchDownState',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理 - 批量修改下架日期
export const batchUpdateOffTimeService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/batchUpdateOffTime',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理 - 批量修改客户
export const batchUpdateCustomerService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/batchUpdateCustomer',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理 - 获取实体仓公司
export const queryDeliveryCompanyListService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/getDeliveryCompanyList',
  type: 'get',
  data,
  loadingFn
});
// 临采商品管理 - 批量添加商品仓位
export const batchAddSkuCompanyService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/batchAddSkuCompany',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理 - 查询商品修改记录
export const queryChangeLogBySkuNoService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/getChangeLogBySkuNo',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理- 列表页面 - 导出
export const exportSkuListService = (data, loadingFn) => requestToExport({
  url: '/sysback/product/collect/exportCollectList',
  type: 'post',
  data,
  loadingFn
});
// 临采商品高级关联
export const getSeniorLinkedCollectListService = (data, loadingFn) => requestToData({
  url: '/sysback/product/collect/getSeniorLinkedCollectList',
  type: 'post',
  data,
  loadingFn
});

/* 新增页面 */

// 临采商品管理- 新增页面 - 修改绑定客户
export const queryCustomerService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/queryCustomer',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理- 新增页面 - 导出
export const exportAddSkuTemplateService = (data, loadingFn) => requestToExport({
  url: '/sysback/product/collect/exportAddSkuTemplate',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理- 新增页面 - 导入
export const importSkuDetailService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/importSkuDetail',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理- 新增页面 - 保存
export const addSaveService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/saveCollect',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理- 新增页面 - 提交
export const addSubmitService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/commitCollect',
  type: 'post',
  data,
  loadingFn
});

/* 修改 */

// 临采商品管理 -详情 - 查询批量编辑商品（批量编辑按钮触发）
export const queryDetailByUuidsService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/batchToUpdate',
  type: 'post',
  data,
  loadingFn
});
// 原材料待办 - 列表查询
export const queryMaterialToDoListService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/rawMaterial/getRawMaterialTodoList',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理 -详情 - 查询寻源下推sku
export const queryDetailBySourcingNoService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/getCollectList',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理 -详情 - 查询项目商品转临采sku
export const queryDetailByProductNoService = (data, loadingFn) => commonRequest({
  url: '/sysback/tempProjectSku/getByUuids4CollectProduct',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理- 修改页面 - 修改临采商品-提交
export const editSubmitService = (data, loadingFn) => commonRequest({
  url: '/sysback/product/collect/updateCollect',
  type: 'post',
  data,
  loadingFn
});
// 临采商品管理- 批量编辑 - 导出
export const exportSkuListForEditService = (data, loadingFn) => requestToExport({
  url: '/sysback/product/collect/exportProductCollectTemplate',
  type: 'post',
  data,
  loadingFn
});
